﻿/*************************************************************
 * Software of blackcore
 *
 * CLRVersion:4.0.30319.586
 * MachineName:SPACE
 * Author:Andy Huang
 * Email:itblackhole@gmail.com
 * DateTime：6/8/2013 2:20:02 PM
 * Function：
 *************************************************************/

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;

namespace Sob.Common
{
    public class PageInfo
    {
        #region ******************************Private Property******************************
        #endregion ******************************Private Property******************************


        #region ******************************Public Property******************************
        /// <summary>
        /// 请求是否成功
        /// </summary>
        public bool IsSuccess { get; set; }

        /// <summary>
        /// 页面ContentType
        /// </summary>
        public string ContentType { get; set; }

        /// <summary>
        /// 页面字符集
        /// </summary>
        public Encoding Charset { get; set; }

        /// <summary>
        /// 页面标题
        /// </summary>
        public string Title { get; set; }

        /// <summary>
        /// 页面描述信息
        /// </summary>
        public string Description { get; set; }

        /// <summary>
        /// 页面关键词
        /// </summary>
        public string Keywords { get; set; }

        /// <summary>
        /// 页面内容
        /// <para>快照信息</para>
        /// </summary>
        public string Snapshot { get; set; }

        /// <summary>
        /// 页面内容
        /// <para>纯文本，移除了html标签内容</para>
        /// </summary>
        public string Content { get; set; }

        /// <summary>
        /// 请求Url
        /// </summary>
        public Uri RequestUri { get; set; }

        /// <summary>
        /// 实际访问Uri
        /// <para>允许跳转访问时，RequestUri和ResponseUri的值则会不一致</para>
        /// </summary>
        public Uri ResponseUri { get; set; }

        /// <summary>
        /// 页面大小 
        /// </summary>
        public long ContentLength { get; set; }

        /// <summary>
        /// 异常信息
        /// </summary>
        public Exception Exception { get; set; }

        /// <summary>
        /// 耗时
        /// </summary>
        public Stopwatch UseTime { get; set; }
        #endregion ******************************Public Property******************************


        #region ******************************Structure******************************
        public PageInfo()
        {
            IsSuccess = false;

            Charset = Encoding.Default;
        }
        #endregion  ******************************Structure******************************


        #region ******************************Private Method******************************
        #endregion ******************************Private Method******************************


        #region ******************************Public Method******************************
        #endregion ******************************Public Method******************************
    }
}
